//
//  BillCell.m
//  HMSupplier
//
//  Created by 孙鹏飞 on 2017/7/6.
//  Copyright © 2017年 haohao. All rights reserved.
//

#import "BillCell.h"
#import "BileModel.h"

#import "PeopleCenterToolkit.h"
#import "SearchModel.h"
@interface BillCell()

@property (weak, nonatomic) IBOutlet UILabel *weekLabel;

@property (weak, nonatomic) IBOutlet UILabel *dateLabel;

@property (weak, nonatomic) IBOutlet UILabel *unitLabel;

@end

@implementation BillCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    self.selectionStyle = UITableViewCellSelectionStyleNone;
}

- (void)setModel:(BileModel *)model
{
    _model = model;
    
    _weekLabel.text = _model.week;
    _dateLabel.text = _model.addtimefix;
    _unitLabel.text = [NSString stringWithFormat:@"%@元",_model.total_price];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

//- (void)setModel:(SearchModel *)model {
//    _model = model;
//    NSDateComponents *data = [PeopleCenterToolkit timestampSwitchTime:[_model.addtime integerValue]];
//    
//    _weekLabel.text = [NSString stringWithFormat:@"星期%@", [self getWeekNumber:[data weekday]]];
//    _dateLabel.text = [NSString stringWithFormat:@"%ld-%ld", [data month], [data day]];
//    _NameLabel.text = _model.item_name;
//    _specifiLabel.text = _model.item_attr;
//    _unitLabel.text = _model.ct;
//}
//
//- (NSString *)getWeekNumber:(NSInteger)number{
//    switch (number) {
//        case 1:
//            return @"一";
//            break;
//        case 2:
//            return @"二";
//            break;
//        case 3:
//            return @"三";
//            break;
//        case 4:
//            return @"四";
//            break;
//        case 5:
//            return @"五";
//            break;
//        case 6:
//            return @"六";
//            break;
//        case 7:
//            return @"七";
//            break;
//        default:
//            break;
//    }
//    return nil;
//}

@end
